package com.jxtc.enterprise.tenant.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.List;

@Schema(description = "租户管理平台更新公司配置 DTO")
@Getter
@Setter
@ToString
public class TenantCompanyDTO {

    @NotBlank(message = "公司 ID 不能为空")
    @Schema(description = "待修改信息的公司 ID", example = "c752804d0cd410267f404dd3f0457a57")
    private String id;

    @NotBlank(message = "公司名称不能为空")
    @Schema(description = "公司名称", example = "云启智能技术公司")
    private String name;

    @NotBlank(message = "公司地址不能为空")
    @Schema(description = "公司地址", example = "南山区 xxx 园区 xx 栋 15 楼 1508")
    private String address;

    @Min(message = "金额不能小于 0", value = 0)
    @Schema(description = "低于多少自动充值", example = "20")
    private Integer threshold;

    @Min(message = "金额不能小于 0", value = 0)
    @Schema(description = "自动充值的金额", example = "100")
    private Integer amount;

    @Schema(description = "HR 名称不能为空", example = "张三")
    private String hrName;

    @Size(message = "手机号必须为 11 位", min = 11, max = 11)
    @Schema(description = "HR 手机号", example = "12345678901")
    private String phoneNumber;

    @Schema(description = "登录密码", example = "12345678")
    private String password;

    @Schema(description = "公司图片链接")
    private TenantCompanyImageDTO images;

    @Schema(description = "是否开启自动充值", example = "false")
    private Boolean autoRecharge;

    /**
     * 配置为某个公司开通了那些时段的 餐品，对应于页面中的 复选框，可以配置一个或多个时段，有效值为
     */
    @Schema(description = "公司开通了哪些时段的餐品")
    private List<TenantMealConfigDTO> mealTypes;

}
